#include<stdio.h>

int maxdivisor(int num1, int num2)
{
	int maxdiv, temp = 1;
    while(temp != 0)
	{
		temp = num1 % num2;
		if(temp == 0)
		{
			maxdiv = num2;
		}
		else
		{
			num1 = num2;
			num2 = temp;
		}

	}

}

void main()
{
	int num1, num2, maxdiv, temp = 1;

	printf("input two postive integers\n");
	scanf("%d%d", &num1, &num2);
    
    maxdiv = maxdivisor(num1,num2);

    printf("maximum common divisor is %d\n",maxdiv);
    printf("minimum common multiple is %d\n",num1 * num2 / maxdiv);

}
